package de.HelloWorld;

import java.sql.Date;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;

public class MainActivity extends Activity {
	
	private Date date;
	private int seconds;


	@SuppressWarnings("deprecation")
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        seconds = date.getSeconds();
        waitTime();
    }
	
	@SuppressWarnings("deprecation")
	public void waitTime(){
		if(seconds+10<date.getSeconds()){
			setContentView(R.layout.activity_main2);
		}
	}
	
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }
}
